﻿/**
 *
 * @file BrowserTableHandlerJunctionAbstract.h
 * @brief 连接系统表格处理器抽象类声明
 * @author wangning (2185896382@qq.com)
 * @date 2024-12-25
 *
 */
#ifndef _BEOWSERTABLE_HANDLER_JUNCTION_Abstract_H___
#define _BEOWSERTABLE_HANDLER_JUNCTION_Abstract_H___

#include "WidgetBrowserTable.h"

namespace EventOper
{
    class OperAbstractJunction;
}
namespace Acoustics
{
    class FITKAcousticsSEASubSysManager;
    class FITKJunctionManager;
}

namespace GUI
{
    /**
     * @brief 连接系统表格处理器抽象类
     * @author wangning (2185896382@qq.com)
     * @date 2024-12-25
     */
    class GUIWIDGETAPI BrowserTableHandlerJunctionAbstract : public BrowserTableAbstractHandler
    {
        Q_OBJECT
    public:
        BrowserTableHandlerJunctionAbstract(WidgetBrowserTable* table);
        virtual ~BrowserTableHandlerJunctionAbstract() = 0;
        /**
         * @brief 右键菜单
         * @param[i]  popMenu        右键菜单
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-12-05
         */
        virtual void contextMenu(QMenu* popMenu) override;
        /**
         * @brief 表头右键菜单
         * @param[i]  popMenu        右键菜单
         * @param[i]  coluIndex      列索引
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-12-05
         */
        virtual void headerContextMenu(QMenu* popMenu, int coluIndex) override;

    protected:
        /**
         * @brief 获取操作器
         * @return EventOper::OperAbstractJunction*
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-12-05
         */
        virtual EventOper::OperAbstractJunction* getJunctionOper() = 0;
        /**
         * @brief 是否允许批量修改
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-12-09
         */
        virtual bool enableAttriSet();
        /**
         * @brief 单元格双击
         * @param[i]  row         行索引
         * @param[i]  colum         列索引
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-12-05
         */
        virtual void itemDoubleClicked(int row, int colum) override;

    private slots:
        /**
         * @brief 编辑连接
         * @author wangning (2185896382@qq.com)
         * @date 2024-12-10
         */
        void editJunctionSlot();
        /**
         * @brief 移除连接
         * @author wangning (2185896382@qq.com)
         * @date 2024-12-10
         */
        void removeJunctionSlot();
        /**
         * @brief  批量设置连接
         * @author wangning (2185896382@qq.com)
         * @date 2024-12-10
         */
        void setAttributeSlot();

    protected:
        /**
         * @brief  子系统管理器
         * @author wangning (2185896382@qq.com)
         * @date 2024-12-10
         */
        Acoustics::FITKAcousticsSEASubSysManager* _seaMgr{};
        /**
         * @brief  连接管理器
         * @author wangning (2185896382@qq.com)
         * @date 2024-12-10
         */
        Acoustics::FITKJunctionManager* _junMgr{};

    };
}


#endif
